<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="u" uri="/iuie-tag"%>
<%@ taglib prefix="lui" tagdir="/WEB-INF/tags" %>

<!DOCTYPE html>
<html>
<c:set var="ctx" value="${pageContext.request.contextPath }"/>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户管理</title>

</head>
<lui:context/>
<u:View basePath="/res-system/user" userJS="user" userCSS="user" delayLoadJs="false">
<body>
<lui:boards>
	<lui:board width="100%" boardTitle="用户管理">
		<form id="findUserFrm" class='m-cust'>
			<!-- 水平排列 -->
			<div class="form-horizontal">
				<div class="form-group">
					<div class="col-md-3 col-sm-3">
						<div class="input-group">
							<label for="userId" class="input-group-addon">账号</label>
							<input name="userId" id="userId" type="text" class="form-control">
						</div>
					</div>
					<div class="col-md-3 col-sm-3">
						<div class="input-group"> 
							<label for="userName" class="input-group-addon">用户姓名</label>
							<input name="userName" id="userName" type="text" class="form-control">
						</div>
					</div>
					<div class="col-md-3 col-sm-3">
						<div class="input-group"> 
							<label for="userPhone" class="input-group-addon">手机号</label>
							<input name="userPhone" id="userPhone" type="text" class="form-control">
						</div>
					</div>
					<div class="col-md-3 col-sm-3">
						<div class="input-group"> 
							<label for="userState" class="input-group-addon">用户状态</label>
							<select name="userState" id="userState" class="form-control">
							    <option value="">请选择</option>
							    <option value='1'>正常</option>
							    <option value='0'>禁用</option>
							</select>
						</div>
					</div>
				</div>
			</div>
			<div class="form-horizontal">
				<div class="form-group">
					<div class="col-md-12 col-sm-12">
						<div class="btn-group" id="buttonGro">
							<button type="button" class="btn btn-primary" onclick="UserPage.queryByCondition()"><i class='fa fa-fw fa-search'></i>查询</button>
							<button type="button" class="btn btn-info" onclick="UserPage.openUserAddDialog()"><i class='fa fa-fw fa-plus'></i>新增</button>
							<button type="reset" class="btn btn-default"><i class='fa fa-fw fa-repeat'></i>重置</button>
						</div>
					</div>
				</div>
			</div>
			<u:dropListView id="dropView_oper">
                <u:dropView name="updateUser" template="edit" onClick="UserPage.updateUser" title="修改用户资料"/>
                <u:dropView name="resetPwd" template="undo" onClick="UserPage.resetUserPwd" title="重置密码"/>
            </u:dropListView>
			<u:dataSet id="userSet" idField="userId">
			    <u:dataField display="ID" name="userId" sort="true"/>
				<u:dataField display="姓名" name="userName" width="180px" align="left"/>
				<u:dataField display="手机号" name="userPhone"/>
				<u:dataField display="状态" name="userState"/>
				<u:dataField display="身份证号" name="userIdcard"/>
				<u:dataField display="创建时间" name="createTime"/>
				<u:dataField display="email" name="userEmail"/>
				<u:dataField name="oper" dropView="dropView_oper" display="操作"/>
			</u:dataSet>
			<!-- 获取用户信息列表ajax -->
			<lui:ajax id="findUsersAjax" url="${ctx }/sys/user/find" formQuery="#findUserFrm" onSuccess="UserPage.onQuerySucc"/>
			<!-- 重置用户密码ajax -->
			<lui:ajax id="resetPwdAjax" url="${ctx }/sys/user/resetPwd" prompt="true" type="post"/>
			<lui:datatable id="datatable" ajax="findUsersAjax" sortable="true" pagination="pagination" dataset="userSet" checkable="true"
			    multiple="false" onItemClick="UserPage.onItemClick" onDoubleClick="UserPage.onDoubleClick" afterSort="UserPage.afterSort"
			    afterReady="UserPage.afterReady" cutLine="true" onRenderItem="UserPage.onRenderItem"/>
			<lui:pagination datatable="datatable" id="pagination" pageSize="15" pageChoice="15" showPageChoice="false"/>
		</form>
		
	</lui:board>
</lui:boards>
</body>
</u:View>
</html>